import { Swiper } from 'react-vant';
import './style.less'
const colors = ['#ace0ff', '#bcffbd', '#e4fabd', '#ffcfac']

const items = colors.map((color, index) => (
    <Swiper.Item key={color}>
      <div
        onClick={() => {
          Toast.info(`你点击了卡片 ${index + 1}`)
        }}
      >
        {index + 1}
      </div>
    </Swiper.Item>
  ))

const SwiperImage = () => {
    return (
      <div className="demo-swiper">
      <Swiper autoplay={5000}>{items}</Swiper>
    </div>
    )
}

export default SwiperImage;